<template>
	<!-- <article v-if="$store.state.wrap">
		<div class="box">
			<div class="info" v-show="$store.state.info">
				<div class="title">
					<p>先完善信息</p>
					<p>才能使用找宠，丢宠功能哦！</p>
				</div>
				<div class="btn">
					<button @click="infoBask">先看看</button>
					<button @click="$router.push({path: '/personInfo'})">现在完善</button>
				</div>
			</div> -->
			<!-- <div class="photo" v-show="$store.state.photo">
				<div class="title">
					<p>系统提示您</p>
					<p style="font-size: 0.13rem;">请先拍下宠物照片，以便您帮他找到主人</p>
				</div>
				<div class="btn">
					<button @click="$store.state.wrap=false">先看看</button>
					<button @click="openPhoto">马上拍照</button>
				</div>
			</div> -->
		<!-- </div>
	</article> -->
</template>

<script type="text/javascript">
	import { MessageBox, Indicator } from 'mint-ui'
	export default {
		data () {
			return {
				wrap: false,
				info: false,
				// photo: false
			}
		},
		methods: {
			infoBask () {
				this.$store.state.wrap = false;
				this.$store.state.info = false;
			},
			openPhoto () {
				var self = this;
				// this.http.get(this.$store.state.hostname + 'yh/getsign.do',{
				// 	params: {
				// 		url: url
				// 	}
				// }).then( res => {

				// 	this.wx.config({
				// 		appId: this.$store.state.appId,
				// 		timestamp: res.timestamp,
				// 		nonceStr: res.nonceStr,
				// 		signature: res.signature,
				// 		jsApiList: [
				// 			'chooseImage'
				// 		]
				// 	})

				// 	this.wx.ready(function(){

				// 	})
				// })
				self.$router.push('/upload-pick');
				this.$store.state.wrap = false;

				// this.wx.chooseImage({
				//     count: 1, // 默认9
				//     sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图，默认二者都有
				//     sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机，默认二者都有
				//     success: function (res) {
				//         // console.log(res)
				//         self.$router.push('/upload-pick')
				//     }
				// });

				// var self = this;
				// var url = window.location.href.split("#")[0];
				// // url = "http://www.mengxsh.cc/xunchong/dist/index.html"
				// console.log(url)
				// this.http.get(this.$store.state.hostname + 'yh/getsign.do',{
				// 	params: {
				// 		date: new Date(),
				// 		url: url
				// 	}
				// }).then( res => {
				// 	console.log(res)
				// 	var res = res.data.data;
				//     Indicator.close();
				// 	this.wx.config({
				// 		appId: self.$store.state.appId,
				// 		timestamp: res.timestamp,
				// 		nonceStr: res.nonceStr,
				// 		signature: res.signature,
				// 		jsApiList: [
				// 			'chooseImage'
				// 		]
				// 	})

				// 	this.wx.ready(function(){
				// 		self.wx.chooseImage({
				// 		    count: 1, // 默认9
				// 		    sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图，默认二者都有
				// 		    sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机，默认二者都有
				// 		    success: function (res) {
				// 		        console.log(res)
				// 		    }
				// 		});
				// 	})
				// })
			}
		},
		computed: {

		}
	}
</script>

<style lang="less" scoped>
	article {
		position: fixed;
		top: 0;left: 0;
		width: 100%;
		height: 100%;
		z-index: 9999;
		background: rgba(0,0,0,0.3);

		.box {
			width: 3rem;
			height: 1.5rem;
			text-align: center;
			background: #fff;
			border-radius:0.3rem;
			position: absolute;
			left: 50%;top: 50%;
			transform: translate(-50%, -50%);

			.title {
				padding: 0 0.3rem;
				padding-top:0.2rem;
				line-height: 0.3rem;
			}

			.btn {
				position: absolute;
				width: 100%;
				bottom:0;
				overflow: hidden;

				button {
					border: none;
					outline: none;
					background: transparent;
					width: 50%;
					float: left;
					line-height: 0.5rem;
					position: relative;
					color: #7AB6C1;
					font-weight: bold;

					&:after {
						content: '';
						position: absolute;
						width: 200%;
						height: 200%;
						top:0;left:0;
						border:1px solid #ccc;
						transform-origin: 0 0;    //设置元素的基点为0 0
						transform: scale(0.5);
					}
				}
			}
		}
	}
</style>
